// import http from '../utils/http'
//用于账户登录
import request from '@/utils/request'

export function hasAll(params) {
    return request({
      url: '/AdminMenu/hasAllForJSON',
      method: 'get',
      params
    })
}
export function Login(params) {
    return request({
      url: '/login/login',
      method: 'get',
      params
    })
}
export function logout(params) {
    return request({
      url: '/login/loginOut',
      method: 'get',
      params
    })
}

export function getInfo(params) {
    return request({
      url: '/user/hasLoginMsg',
      method: 'get',
      params
    })
}
export function hasAllUsers(params) {
  return request({
    url: '/admin/AdminUsers/hasAll',
    method: 'get',
    params
  })
}
export function List(params) {
    return request({
      url: '/admin/AdminUsers/hasAllToPage',
      method: 'get',
      params
    })
}
export function Add(data) {
    return request({
      url: '/admin/AdminUsers/add',
      method: 'post',
      data
    })
}
export function Update(data) {
    return request({
      url: '/admin/AdminUsers/update',
      method: 'post',
      data
    })
}
export function Delete(data) {
    return request({
      url: '/admin/AdminUsers/delete',
      method: 'post',
      data
    })
}


export function AdminRolesAll(data) {
    return request({
      url: '/admin/AdminRoles/hasAll',
      method: 'get',
      data
    })
}

export function RolesAdd(data) {
  return request({
    url: '/AdminRoleUsers/add',
    method: 'post',
    data
  })
}
export function RolesUpdate(data) {
  return request({
    url: '/AdminRoleUsers/update',
    method: 'post',
    data
  })
}
